/* $Id: UserDAO.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.dao;

import java.util.List;

import ae.pcfc.etks.online.common.domain.User;
import ae.pcfc.etks.online.common.vo.PagingVO;

public interface UserDAO {
	
	/**
	 * findUserByUserName
	 * Method to find the user by username
	 * @param strUserName
	 * @return
	 * User
	 */
	public User findUserByUserName(String strUserName);
	
	/**
	 * getUserList
	 * Method to find the list of all users
	 * @return
	 * List<User>
	 */
	public List<User> getUserList();
	
	/**
	 * getUserListByPagingParameters
	 * Method to find the list of users of a page based on the paging information
	 * @param pagingVO
	 * @return
	 * List<User>
	 */
	public List<User> getUserListByPagingParameters(PagingVO pagingVO);
	
	/**
	 * finByPrimaryKey
	 * Method to find the user by primary key
	 * @param id
	 * @return
	 * User
	 */
	public User finByPrimaryKey(Long id);
	
	/**
	 * getUserByEmail
	 * Method to find the user by email address
	 * @param email
	 * @return
	 * User
	 */
	public User getUserByEmail(String email);
	
	/**
	 * add
	 * Method to add the user domain object in the database
	 * @param user
	 * void
	 */
	public void add(User user);
	
	/**
	 * update
	 * Method to update the user domain object in the database
	 * @param user
	 * void
	 */
	public void update(User user);
	
	/**
	 * findUserByEmailExceptCurrentUser
	 * Method to find any other user with same email address
	 * @param strEmail
	 * @param lUserId
	 * @return
	 * User
	 */
	public User findUserByEmailExceptCurrentUser(String strEmail, Long lUserId);

	/**
	 * findUserByEmailExceptCurrentCompany
	 * Method to find the any other company user with the same email address 
	 * @param strEmail
	 * @param strTrakheesId
	 * @return
	 * User
	 */
	public User findUserByEmailExceptCurrentCompany(String strEmail,
			String strTrakheesId);
	/**
	 * findUsersByTrakheesId
	 * Method to find the users of a client(trakheesid)
	 * @param strTrakheesId
	 * @return
	 * List<User>
	 */
	public List<User> findUsersByTrakheesId(String strTrakheesId);

	/**
	 * findClientAdminByTrakheesId
	 * Method to find the Client Admin of a Client by using its Trakhees Id
	 * @param strTrakheesId
	 * @return
	 * User
	 */
	public User findClientAdminByTrakheesId(String strTrakheesId);

	/**
	 * delete
	 * 
	 * @param obj
	 * void
	 */
	public void delete(User obj);	
	
}
